package cn.wolfcode.trip.base.domain;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.*;

@Setter@Getter@ToString
@AllArgsConstructor
@NoArgsConstructor
@JsonIgnoreProperties("handler")
public class User extends BaseDomain {
    public static final Integer GENDER_NONE = 0; //保密
    public static final Integer GENDER_MALE = 1; //男
    public static final Integer GENDER_FEMALE = 2; //女

    private String email; //邮箱,作用用户名来登录

    private String nickName; //昵称

    private String password; //密码

    private String place; //地区

    private String headImgUrl; //头像

    private Integer gender = GENDER_NONE; //性别

    private String coverImgUrl; //背景

    private String sign; //个性签名

    private Integer attentionNumber;//关注人数

    private Integer fansNumber;//粉丝人数

    private Integer chatNumber;//好友申请数量

    private Integer travelNumber;//发布游记数量
    public String getGenderName() {
        String msg = "保密";
        if (gender == GENDER_MALE) {
            msg = "男";
        } else if (gender == GENDER_FEMALE) {
            msg = "女";
        }
        return msg;
    }
}